import radio from "./rule/radio";
import checkbox from "./rule/checkbox";
import input from "./rule/input";
import number from "./rule/number";
import select from "./rule/select";
import _switch from "./rule/switch";
import slider from "./rule/slider";
import time from "./rule/time";
import date from "./rule/date";
import rate from "./rule/rate";
import color from "./rule/color";
import row from "./rule/row";
import divider from "./rule/divider";
import cascader from "./rule/cascader";
import upload from "./rule/upload";
import transfer from "./rule/transfer";
import tree from "./rule/tree";
import alert from "./rule/alert";
import span from "./rule/span";
import space from "./rule/space";
import button from "./rule/button";
import editor from "./rule/editor";
import tab from "./rule/tab";
import group from "./rule/group";
import dateRange from "./rule/dateRange";
import timeRange from "./rule/timeRange";
import tableForm from "./rule/tableForm";
import textarea from "./rule/textarea";
import subForm from "./rule/subForm";
import html from "./rule/html";

export default function createMenu({ t }) {
  return [
    {
      name: "main",
      title: t("menu.main"),
      list: [
        input,
        textarea,
        number,
        radio,
        checkbox,
        select,
        _switch,
        time,
        timeRange,
        date,
        dateRange,
        slider,
        rate,
        color,
        cascader,
        upload,
        transfer,
        tree,
        editor,
        group,
        html,
        subForm,
        tableForm,
      ],
    },
    {
      name: "aide",
      title: t("menu.aide"),
      list: [alert, button, span, divider],
    },
    {
      name: "layout",
      title: t("menu.layout"),
      list: [row, tab, space],
    },
  ];
}
